{{ define "config.html" }}

<body>
    <div class="container-lg">
        <br>
    <div class="row">
        <div class="col-md">
        <div class="card border-primary">
            <div class="card-header">Config</div>
        <div class="card-body table-responsive">
        <table class="table table-borderless">
            <form action="/config/" method="post">
                <tr>
                    <td>Host</td>
                    <td><input name="host" type="text" class="form-control" value="{{ .Config.Host }}"></td>
                </tr>
                <tr>
                    <td>Port</td>
                    <td><input name="port" type="text" class="form-control" value="{{ .Config.Port }}"></td>
                </tr>
                <tr>
                    <td>Theme</td>
                    <td><select name="theme" class="form-select">
                        <option selected>{{ .Config.Theme }}</option>
                        {{ range .Themes }}
                            <option value="{{ . }}">{{ . }}</option>
                        {{ end }}
                    </select></td>
                </tr>
                <tr>
                    <td>Color mode</td>
                    <td><select name="color" class="form-select">
                        <option selected>{{ .Config.Color }}</option>
                        <option value="light">light</option>
                        <option value="dark">dark</option>
                    </select></td>
                </tr>
                <tr>
                    <td>HeatMap Color</td>
                    <td>
                        <input name="heatcolor" value="{{ .Config.HeatColor }}" type="color" class="form-control form-control-color">
                    </td>
                </tr>
                <tr>
                    <td>Page Step</td>
                    <td><input name="pagestep" type="number" class="form-control" value="{{ .Config.PageStep }}"></td>
                </tr>
                <tr>
                    <td><button type="submit" class="btn btn-primary">Save</button></td>
                    <td></td>
                </tr>
            </form>
        </table>
        </div>
        </div>
        </div>
        <div class="col-md">
            <div class="card border-primary">
                <div class="card-header">Version</div>
                <div class="card-body">
                    <a href="https://github.com/aceberg/ExerciseDiary/releases/tag/{{ .Version }}" target="_blank">{{ .Version }}</a>
                </div>
            </div>
            <br>
            <div class="card border-primary">
                <div class="card-header">About</div>
            <div class="card-body">
                <p>● After changing <b>Host</b> or <b>Port</b> the app must be restarted</p>
                <p>● <b>Page Step</b> - how many items to show on one page (for <a href="/stats/">Stats</a> and <a href="/weight/">Weight</a>)</p>
                <p>● Please, check out my other apps on <a href="https://github.com/aceberg" target="_blank">GitHub</a></p>
                <p>● Want your own Self-Hosted app written in Go? Contact and prices <a href="https://github.com/aceberg" target="_blank">here</a></p>
            </div>
        </div>
    </div>
    </div>
        

{{ template "footer.html" }}
{{ end }}